package com.xiyuan.Entity2Json.bean;

import java.util.LinkedList;
import java.util.List;

public class JsonResult {
    private List<String> fieldList;
    private String jsonString;

    public JsonResult() {
        this.fieldList = new LinkedList<>();
    }

    public void addFieldToList(String field) {
        this.fieldList.add(field);
    }

    public List<String> getFieldList() {
        return fieldList;
    }

    public void setFieldList(List<String> fieldList) {
        this.fieldList = fieldList;
    }

    public JsonResult(List<String> fieldList) {
        if (fieldList == null) {
            this.fieldList = new LinkedList<>();
        }
        this.fieldList = fieldList;
    }


    public String getJsonString() {
        return jsonString;
    }

    public void setJsonString(String jsonString) {
        this.jsonString = jsonString;
    }
}
